#pragma once

#include "const.h"


class CServer : public std::enable_shared_from_this<CServer>
{
public:
	CServer(boost::asio::io_context& ioc, unsigned short& port);
	~CServer();

	// 开启服务器，监听对端连接
	void start();

private:
	boost::asio::ip::tcp::acceptor m_acceptor; // 监听对端的连接
	boost::asio::io_context& m_ioc;
};

